const path = require("path");
module.exports = {
  lang: "zh-CN",
  title: "方圆的博客",
  base: "/",
  description: "专注于前端技术的总结，努力做一名知识的传播者。",
  head: [
    [
      "link",
      {
        rel: "icon",
        href: "/img/favicon.ico",
      },
    ],
    [
      "meta",
      {
        name: "viewport",
        content: "width=device-width,initial-scale=1,user-scalable=no",
      },
    ],
    [
      "meta",
      {
        name: "baidu-site-verification",
        content: "46b796951906a3668829c1d088ac00a8",
      },
    ],
    [
      "meta",
      {
        name: "360-site-verification",
        content: "d875e01c019d59663bca7a9345a8f073",
      },
    ],
    // 添加百度站长的自动推送代码
    [
      "script",
      {
        src: "/assets/js/autopush-baidu.js",
      },
    ],
    // 添加360站长的自动推送代码
    [
      "script",
      {
        src: "/assets/js/autopush-360.js",
      },
    ],
  ],
  plugins: [
    "@vuepress/back-to-top",
    "@vuepress/medium-zoom",
    "vuepress-plugin-code-copy",
    // "@vuepress/nprogress",
    // [
    //   "vuepress-plugin-comment",
    //   {
    //     choosen: "valine",
    //     // options选项中的所有参数，会传给Valine的配置
    //     options: {
    //       el: "#valine-vuepress-comment",
    //       appId: "3ea8DT95Su8QSTI7kzLdgBhs-gzGzoHsz",
    //       appKey: "hCFE7LjJKC1LnBbA2ld4q0Ok",
    //     },
    //   },
    // ],
    // [
    //   "@vuepress-reco/vuepress-plugin-bulletin-popover",
    //   {
    //     width: "300px", // 默认 260px
    //     title: "消息提示",
    //     body: [
    //       {
    //         type: "title",
    //         content: "欢迎加入微信交流群 🎉🎉🎉",
    //         style: "text-aligin: center;",
    //       },
    //       {
    //         type: "image",
    //         src: "/img/wxCode.png",
    //         style: "width:100px;height:100px;",
    //       },
    //     ],
    //     footer: [
    //       {
    //         type: 'button',
    //         text: '打赏',
    //         link: '/donate'
    //       },
    //       // {
    //       //   type: "title",
    //       //   content: "打赏",
    //       //   style: "text-aligin: center;",
    //       // },
    //       // {
    //       //   type: "image",
    //       //   src: "/img/wxPay.png",
    //       //   style: "width:100px;height:100px;",
    //       // },
    //     ],
    //   },
    // ],
  ],
  palette: path.resolve(__dirname, "palette.styl"),
  themeConfig: {
    // 当前 locale 的 algolia docsearch 选项
    algolia: {},
    nav: [
      { text: "指南", link: "/guide/", ariaLabel: "指南" },
      {
        text: "网盘资源",
        ariaLabel: "网盘资源",
        link: "https://alist.1996f.cn/",
        // link: "https://alist.canuse.top/"
      },
      {
        text: "JavaScript",
        link: "/content/JavaScript/",
        ariaLabel: "JavaScript",
      },
      { text: "CSS", link: "/content/Css/", ariaLabel: "CSS" },
      { text: "Vue", link: "/content/Vue/", ariaLabel: "Vue" },
      { text: "React", link: "/content/React/", ariaLabel: "React" },
      { text: "Webpack", link: "/content/Webpack/", ariaLabel: "Webpack" },
      { text: "Electron", link: "/content/Electron/", ariaLabel: "Electron" },
      { text: "HTTP", link: "/content/Http/", ariaLabel: "Http" },
      {
        text: "概念详解",
        link: "/content/Concept/",
        ariaLabel: "概念详解",
      },
      {
        text: "原理分析",
        link: "/content/Principle/",
        ariaLabel: "原理分析",
      },
      {
        text: "性能优化",
        link: "/content/Performance/",
        ariaLabel: "性能优化",
      },
      {
        text: "疑难杂症",
        link: "/content/Problem/",
        ariaLabel: "疑难杂症",
      },
      {
        text: "源码",
        ariaLabel: "源码",
        items: [
          {
            text: "Javascript",
            link: "/content/Source/Javascript/",
          },
          {
            text: "Vue2源码学习",
            link: "/content/Source/Vue/Vue2/",
          },
          {
            text: "vue内部运行机制",
            link: "/content/Source/Vue/Internal/",
          },
        ],
      },
      {
        text: "工具",
        ariaLabel: "工具",
        items: [
          {
            text: "PicGo图床",
            link: "/content/Tools/Picgo/",
          },
          {
            text: "CI/CD",
            link: "/content/Tools/CICD/",
          },
          {
            text: "宝塔面板+青龙面板",
            link: "/content/Tools/BTQL/",
          },
        ],
      },
      {
        text: "关于我",
        ariaLabel: "关于我",
        items: [
          {
            text: "掘金",
            link: "https://juejin.cn/user/1996368846533672",
          },
          // {
          //   text: "码云",
          //   link: "https://gitee.com/fqcto",
          // },
          // {
          //   text: "Github",
          //   link: "https://github.com/fqcto",
          // },
          // {
          //   text: "哔哩哔哩",
          //   link: "https://space.bilibili.com/133296644",
          // },
          {
            text: "组件库",
            // link: "https://canuse.1996f.cn/#/guide/intro/index",
            link: "https://canuse.top/#/guide/intro/index",
          }
        ],
      },
    ],
    // sidebar: "auto",
    sidebar: {
      "/guide/": [
        {
          title: "JavaScript",
          path: "/content/JavaScript/",
        },
        {
          title: "CSS",
          path: "/content/Css/",
        },
        {
          title: "Vue",
          path: "/content/Vue/",
        },
        {
          title: "React",
          path: "/content/React/",
        },
        {
          title: "Webpack",
          path: "/content/Webpack/",
        },
        {
          title: "Electron",
          path: "/content/Electron/",
        },
        {
          title: "HTTP",
          path: "/content/Http/",
        },
        {
          title: "概念详解",
          path: "/content/Concept/",
        },
        {
          title: "原理分析",
          path: "/content/Principle/",
        },
        {
          title: "性能优化",
          path: "/content/Performance/",
        },
        {
          title: "疑难杂症",
          path: "/content/Problem/",
        },
        {
          title: "Vue2源码学习",
          path: "/content/Source/Vue/Vue2/",
        },
        {
          title: "Vue内部运行机制",
          path: "/content/Source/Vue/Internal/",
        }
      ],
      "/content/JavaScript/": [""],
      "/content/Css/": [""],
      "/content/Vue/": [""],
      "/content/React/": [""],
      "/content/Webpack/": [""],
      "/content/Electron/": [""],
      "/content/Http/": [""],
      "/content/Concept/": [""],
      "/content/Principle/": [""],
      "/content/Performance/": [""],
      "/content/Problem/": [""],
      "/content/Source/Javascript/": [""],
      "/content/Source/Vue/Vue2/": [""],
      "/content/Source/Vue/Internal/": [""],
      "/content/Tools/Picgo/": [""],
      "/content/Tools/CICD/": [""],
      "/content/Tools/BTQL/": [""]
    },
    sidebarDepth: 3,
    markdown: {
      extractHeaders: ["h2", "h3", "h4", "h5", "h6"],
      lineNumbers: true,
    },
    search: true,
    searchMaxSuggestions: 10,
    author: "方圆",
    authorAvatar: "/avatar.png",
    record: "鄂ICP备18011010号-2",
    startYear: "2018",
  },
};
